import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

/**
 * @author gao
 * @date 2025/8/10 16:12
 */

public class Demo5 {
    public static void main(String[] args) throws IOException {
        //创建一个文件输入流对象，”打开文件“的过程
        InputStream inputStream = new FileInputStream("./test.txt");
        while (true) {
            int c = inputStream.read();
            if (c == -1) {
                // 读取完毕
                break;
            }
            System.out.printf("0x%x\n", c);
        }
    }
}